//
//  OADTableImplementation.m
//  OASDK_Works
//
//  Created by ChenJie on 3/1/20.
//  Copyright © 2020 Mist. All rights reserved.
//

#import "OADTableImplementation.h"
#import "UITableView+OADTableConfig.h"

@interface OADTableImplementation ()

@end

@implementation OADTableImplementation

#pragma mark - Lifecycle methods

- (instancetype)init {
    self = [super init];
    if (self) {
    }
    return self;
}

#pragma mark - Public methods



#pragma mark - Private methods



#pragma mark - Delegate methods



#pragma mark - <UITableViewDataSource>

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return [tableView oa_numberOfSectionsInTableView];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [tableView oa_numberOfRowsInSection:section];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//    NSLog(@"%@ - (%ld, %ld)", NSStringFromSelector(_cmd), (long)indexPath.section, (long)indexPath.row);
    return [tableView oa_cellForRowAtIndexPath:indexPath];
}

#pragma mark - <UITableViewDelegate>

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
//    NSLog(@"%@ - (%ld, %ld)", NSStringFromSelector(_cmd), (long)indexPath.section, (long)indexPath.row);
    return [tableView oa_heightForRowAtIndexPath:indexPath];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
//    OADSectionConfig *sectionConfig = [tableView.oa_tableConfig sectionConfigAtIndex:indexPath.section];
//    OADCellConfig *cellConfig = [sectionConfig cellConfigAtIndex:indexPath.row];

    
    
//    UIViewController *vc = [self targetViewControllerAtIndexPath:indexPath];
//    [self.navigationController pushViewController:vc animated:YES];
}

#pragma mark - Setter



#pragma mark - Getter



#pragma mark - Memory management methods

- (void)dealloc {
}

@end
